package za.co.smartmi.model;

import java.io.Serializable;

/** 
 * This class represents the primary key of the client table.
 */
public class ClientPk implements Serializable
{
	protected Integer clientid;

	/** 
	 * Sets the value of clientid
	 */
	public void setClientid(Integer clientid)
	{
		this.clientid = clientid;
	}

	/** 
	 * Gets the value of clientid
	 */
	public Integer getClientid()
	{
		return clientid;
	}

	/**
	 * Method 'ClientPk'
	 * 
	 */
	public ClientPk()
	{
	}

	/**
	 * Method 'ClientPk'
	 * 
	 * @param clientid
	 */
	public ClientPk(final Integer clientid)
	{
		this.clientid = clientid;
	}

	/**
	 * Method 'equals'
	 * 
	 * @param _other
	 * @return boolean
	 */
	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof ClientPk)) {
			return false;
		}
		
		final ClientPk _cast = (ClientPk) _other;
		if (clientid == null ? _cast.clientid != clientid : !clientid.equals( _cast.clientid )) {
			return false;
		}
		
		return true;
	}

	/**
	 * Method 'hashCode'
	 * 
	 * @return int
	 */
	public int hashCode()
	{
		int _hashCode = 0;
		if (clientid != null) {
			_hashCode = 29 * _hashCode + clientid.hashCode();
		}
		
		return _hashCode;
	}

	/**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "za.co.smartmi.dto.ClientPk: " );
		ret.append( "clientid=" + clientid );
		return ret.toString();
	}

}
